package org.jpokerparser.application;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.KeyStroke;

import org.jpokerparser.gui.components.OpacityCheckboxAction;
import org.jpokerparser.gui.components.TransparentBackground;

public class JPokerParser {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		JFrame frame = new JFrame();

		
		//Where the GUI is created:
		JMenuBar menuBar;
		JMenu menu, submenu;
		JMenuItem menuItem;
	
		//Create the menu bar.
		menuBar = new JMenuBar();

		//Build the first menu.
		menu = new JMenu("A Menu");
		menu.setMnemonic(KeyEvent.VK_A);
		menu.getAccessibleContext().setAccessibleDescription(
		        "The only menu in this program that has menu items");
		menuBar.add(menu);

		//a group of JMenuItems
		menuItem = new JMenuItem("New Tournament",
		                         KeyEvent.VK_T);
		//menuItem.setAccelerator(KeyStroke.getKeyStroke(
		//        KeyEvent.VK_1, ActionEvent.ALT_MASK));
		//menuItem.getAccessibleContext().setAccessibleDescription(
		//        "This doesn't really do anything");
		menuItem.setAction(new OpacityCheckboxAction(frame));
		menu.add(menuItem);
		
		menuBar.add(menu);

		frame.setJMenuBar(menuBar);


		
		
		
		frame.setAlwaysOnTop(true);
		
		//TransparentBackground bg = new TransparentBackground(frame);

		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		//frame.getContentPane().add(bg);

		//frame.pack();
		
		frame.setSize(500, 500);

		frame.setLocation(500, 500);

		//setWindowOpacity()
		
		frame.setVisible(true);


		
	}

}
